{template 'public/header'}
{template 'public/comhead'}
<link rel="stylesheet" type="text/css" href="../addons/zh_gjw/template/public/ygcsslist.css">
<style type="text/css">
    .yg5_key>div{float: left;line-height: 34px;}
    .store_td1{height: 45px;}
    .store_list_img{width: 60px;height: 60px;}
    .yg5_tabel{border-color: #e5e5e5;outline: 1px solid #e5e5e5;}
    .yg5_tr2>td{padding: 10px 15px;border: 1px solid #e5e5e5;text-align:center;}
    .yg5_tr1>th{
        border: 1px solid #e5e5e5;
        padding-left: 15px;
        background-color: #FAFAFA;
        font-weight: bold;
        text-align: center;
    }
    .yg5_btn{background-color: #EEEEEE;color: #333;border: 1px solid #E4E4E4;border-radius: 6px;width: 100px;height: 34px;}
    /*#frame-2{display: block;visibility: visible;}*/
</style>
<ul class="nav nav-tabs">
    <span class="ygxian"></span>
    <div class="ygdangq">当前位置:</div>    
    <li class="active"><a href="javascript:void(0);">帮助列表</a></li>
    <li><a href="{php echo $this->createWebUrl('addhelp')}">添加帮助</a></li>
</ul>
<div class="main">
        <div class="panel panel-default ygdefault">
            <div class="panel-heading wyheader">
                系统设置&nbsp;>&nbsp;帮助中心设置&nbsp;>&nbsp;帮助列表
            </div>
            <div class="panel-body" style="padding: 0px 15px;">

                <div class="row">
                <table class="yg5_tabel col-md-12">
                    <tr class="yg5_tr1" style="height: 50px">                   
                        <th class="col-md-1">排序</th>                        
                        <th class="col-md-1">标题</th>        
                        <th class="col-md-1">文章</th>              
                        <!-- <th class="col-md-1">链接</th> -->
                        <th class="col-md-1">创建时间</th>
                        <th class="col-md-2">操作</th>
                    </tr>
                    {loop $help $row}
                    <tr class="yg5_tr2">
                        <td>{$row['sort']}</td>
                        <td>{$row['title']}</td>
                        <td>{php echo mb_substr(strip_tags(htmlspecialchars_decode($row['content'])),0,20,'utf-8')}...</td>
                        <!-- <td>...{php echo mb_substr(strip_tags(htmlspecialchars_decode($row['link'])),-20,20,'utf-8')}</td> -->
                        <td>{$row['time']}</td>
                        <td>
                            {if $row['state']==1}
                            <a href="{php echo $this->createWebUrl('help', array('op' => 'hoty', 'id' => $row['id']))}"><span class="btn ygyouhui2 btn-xs" style="color:green;border:1px solid green;" id="btnx"><input type="hidden" value="{$row['id']}"><input style="border:none;background:none;" type="button" value="启用"></span></a>
                            {elseif $row['state']==0}
                            <a href="{php echo $this->createWebUrl('help', array('op' => 'hotx', 'id' => $row['id']))}"><span class="btn ygshouqian2 btn-xs" style="color:#ccc;border:1px solid #ccc;" id="btny"><input type="hidden" value="{$row['id']}"><input style="border:none;background:none;" type="button" value="禁止"></span></a>
                            {/if}
                            <a href="{php echo $this->createWebUrl('addhelp', array('id' => $row['id']))}" class="storespan btn btn-xs">
                                <span class="fa fa-pencil"></span>
                                <span class="bianji">编辑<span class="arrowdown"></span>
                                </span>
                            
                            </a>
                            <a href="javascript:void(0);" class="storespan btn btn-xs" data-toggle="modal" data-target="#myModal{$row['id']}">
                                <span class="fa fa-trash-o"></span>
                                <span class="bianji">删除<span class="arrowdown"></span>
                                </span>
                            </a>
                        </td>
                    </tr>
                    <div class="modal fade" id="myModal{$row['id']}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
                      <div class="modal-dialog" role="document">
                        <div class="modal-content">
                          <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                            <h4 class="modal-title" id="myModalLabel" style="font-size: 20px;">提示</h4>
                          </div>
                          <div class="modal-body" style="font-size: 20px">
                            确定删除么？
                          </div>
                          <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                                <a href="{php echo $this->createWebUrl('help', array('op' => 'delete', 'id' => $row['id']))}" type="button" class="btn btn-info" >确定</a>
                          </div>
                        </div>
                      </div>
                    </div>
                    {/loop}
                </table>
              </div>

            </div>

        </div>

</div>

<script type="text/javascript">
    $(function(){
        // $("#frame-14").addClass("in");
        $("#frame-14").show();
        $("#yframe-14").addClass("wyactive");
    })
</script>